var first = [{
    "type1": "即将测试 | 875.7M",
    "name1": "死亡细胞",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/21/203831732_.gif"]
}, {
    "type1": "不删档内测 | 1.4GB",
    "name1": "妄想山海",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/5/198663481_.png"]
}, {
    "type1": "不删档内测 | 428.4M",
    "name1": "荣耀大天使",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/2/2/209548595_.gif"]
}, {
    "type1": "公测 | 2.0GB",
    "name1": "影之刃3",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/28/207161840_.gif"]
}, {
    "type1": "公测 | 1.2GB",
    "name1": "蓝月传奇2",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/11/200558547_.png"]
}, {
    "type1": "不删档内测 | 1.8GB",
    "name1": "镖人",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/18/202482281_.gif"]
}, {
    "type1": "不删档内测 | 357.4M",
    "name1": "绝世战魂",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/2/6/212223888_.gif"]
}, {
    "type1": "不删档内测 | 227.4M",
    "name1": "神将三国",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/2/5/211751343_.gif"]
}, {
    "type1": "不删档内测 | 360.1M",
    "name1": "幻想Q传",
    "img_url": ["http://image.9game.cn/s/9game/g/2020/7/7/168978922_.png"]
}, {
    "type1": "公测 | 203.7M",
    "name1": "像素危城",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/2/2/209610351_.png"]
}];
var new1=document.querySelector(".new1");
var str="";
for (var i=0; i<first.length; i++){
    str +=`<li>
    <i class="corner"></i>
    <a href="#" class="img">
        <img src="${first[i].img_url}" alt="${first[i].name1}">
        <span class="radius3"></span>
    </a>
    <p class="name"><a href="#">${first[i].name1}</a></p>
    <p class="type">${first[i].type1}</p>
    <div class="fav">
        <span class="good"></span>
        <span class="good"></span>
        <span class="good"></span>
        <span class="good"></span>
        <span class="bad"></span>
    </div>
    <a href="#" class="down">立即下载</a>
</li>`
}
new1.innerHTML=str;
var second = [{
        "type1": "运营 | 815.2M",
        "name1": "奥特曼宇宙",
        "bad1":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/2/4/210799528_.png"]
    }, {
        "type1": "运营 | 151.8M",
        "name1": "太空狼人杀",
        "bad1":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/14/201366101_.png"]
    }, {
        "type1": "公测 | 1.9GB",
        "name1": "天谕",
        "bad1":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/30/196886520_.gif"]
    }, {
        "type1": "不删档内测 | 1.6GB",
        "bad1":"bad",
        "name1": "梦想新大陆",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/19/202815337_.png"]
    }, {
        "type1": "公测 | 189.5M",
        "name1": "游戏王",
        "bad1":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/7/199190574_.png"]
    }, {
        "type1": "公测 | 2.0GB",
        "name1": "机动都市阿尔法",
        "bad1":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/19/202771566_.png"]
    }, {
        "type1": "公测 | 1.1GB",
        "name1": "上古王冠",
        "bad1":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/2/3/210032140_.png"]
    }, {
        "type1": "不删档内测 | 765.1M",
        "name1": "战机归来",
        "bad1":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/28/196090015_.png"]
    }, {
        "type1": "不删档内测 | 906.2M",
        "name1": "通感纪元",
        "bad1":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/15/190856923_.png"]
    }, {
        "type1": "公测 | 611.2M",
        "name1": "星耀对决",
        "bad1":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/11/20/186715824_.png"]
    }

];
var new2=document.querySelector(".new2");
var str1="";
for (var i1=0; i1<second.length; i1++){
    str1 +=`<li>
    <i class="corner"></i>
    <a href="#" class="img">
        <img src="${second[i1].img_url}" alt="${second[i1].name1}">
        <span class="radius3"></span>
    </a>
    <p class="name"><a href="#">${second[i1].name1}</a></p>
    <p class="type">${second[i1].type1}</p>
    <div class="fav">
        <span class="good"></span>
        <span class="good"></span>
        <span class="good"></span>
        <span class="${second[i1].bad1}"></span>
        <span class="bad"></span>
    </div>
    <a href="#" class="down">立即下载</a>
</li>`
}
new2.innerHTML=str1;
var thirdly = [{
        "type1": "即将测试 | 2.0M",
        "name1": "合成大西瓜",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/27/206715955_.jpg"]
    }, {
        "type1": "运营 | 271.4M",
        "name1": "网吧经营模拟器",
        "bad1":"good",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/31/197022289_.png"]
    }, {
        "type1": "运营 | 84.6M",
        "name1": "超级兔子人联网版",
        "bad1":"good",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/25/205717636_.png"]
    }, {
        "type1": "不删档内测 | 343.6M",
        "name1": "王牌高校",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/12/200837657_.gif"]
    }, {
        "type1": "公测 | 516.7M",
        "name1": "威力无双",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/2/4/211025106_.png"]
    }, {
        "type1": "运营 | 59.9M",
        "name1": "狼人太空杀",
        "bad1":"good",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/8/199570782_.jpg"]
    }, {
        "type1": "不删档内测 | 53.2M",
        "name1": "盟重英雄",
        "bad1":"good",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/12/200827889_.png"]
    }, {
        "type1": "公测 | 883.7M",
        "name1": "绯红之境",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/11/26/187096949_.png"]
    }, {
        "type1": "不删档内测 | 424.8M",
        "name1": "末日雄师",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/25/205759309_.png"]
    }, {
        "type1": "运营 | 81.7M",
        "name1": "粉末游戏",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/6/198958221_.png"]
    }

];
var new3=document.querySelector(".new3");
var str2="";
for (var i2=0; i2<thirdly.length; i2++){
    str2 +=`<li>
    <i class="corner"></i>
    <a href="#" class="img">
        <img src="${thirdly[i2].img_url}" alt="${thirdly[i2].name1}">
        <span class="radius3"></span>
    </a>
    <p class="name"><a href="#">${thirdly[i2].name1}</a></p>
    <p class="type">${thirdly[i2].type1}</p>
    <div class="fav">
        <span class="good"></span>
        <span class="good"></span>
        <span class="${thirdly[i2].bad1}"></span>
        <span class="${thirdly[i2].bad2}"></span>
        <span class="bad"></span>
    </div>
    <a href="#" class="down">立即下载</a>
</li>`
}
new3.innerHTML=str2;
var fourthly = [{
        "type1": "公测 | 150.5M",
        "name1": "格子征战",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/7/16/169355239_.png"]
    }, {
        "type1": "不删档内测 | 273.3M",
        "name1": "一千克拉女王",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/15/201636519_.png"]
    }, {
        "type1": "运营 | 100.6M",
        "name1": "空难模拟器",
        "bad1":"good",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/11/5/185057653_.png"]
    }, {
        "type1": "运营 | 39.3M",
        "name1": "全面战争模拟器：沙雕竞技场",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/22/204402234_.png"]
    }, {
        "type1": "公测 | 842.4M",
        "name1": "阿卡迪亚",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/28/195967324_.png"]
    }, {
        "type1": "公测 | 826.5M",
        "name1": "战三国",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/13/201202253_.png"]
    }, {
        "type1": "运营 | 93.5M",
        "name1": "我们之中",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/14/201366976_.png"]
    }, {
        "type1": "不删档内测 | 187.7M",
        "name1": "口袋宠物世界",
        "bad1":"bad",
        "bad2":"bad",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/14/201482196_.gif"]
    }, {
        "type1": "不删档内测 | 192.8M",
        "name1": "天命起源",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2021/1/25/205813053_.gif"]
    }, {
        "type1": "运营 | 89.3M",
        "name1": "城市岛屿模拟",
        "bad1":"good",
        "bad2":"good",
        "img_url": ["http://image.9game.cn/s/9game/g/2020/12/11/189055570_.png"]
    }

];
var new4=document.querySelector(".new4");
var str3="";
for (var i3=0; i3<fourthly.length; i3++){
    str3 +=`<li>
    <i class="corner"></i>
    <a href="#" class="img">
        <img src="${fourthly[i3].img_url}" alt="${fourthly[i3].name1}">
        <span class="radius3"></span>
    </a>
    <p class="name"><a href="#">${fourthly[i3].name1}</a></p>
    <p class="type">${fourthly[i3].type1}</p>
    <div class="fav">
        <span class="good"></span>
        <span class="good"></span>
        <span class="${fourthly[i3].bad1}"></span>
        <span class="${fourthly[i3].bad2}"></span>
        <span class="bad"></span>
    </div>
    <a href="#" class="down">立即下载</a>
</li>`
}
new4.innerHTML=str3;
var fifth = [{
    "type1": "不删档内测 | 609.4M",
    "name1": "乱世纷争",
    "bad1":"good",
    "bad2":"good",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/25/205716881_.png"]
}, {
    "type1": "运营 | 98.5M",
    "name1": "山村老屋3之守墓人",
    "bad1":"bad",
    "bad2":"bad",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/18/202550169_.jpg"]
}, {
    "type1": "不删档内测 | 478.8M",
    "name1": "黎明航线",
    "bad1":"good",
    "bad2":"good",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/29/207738271_.png"]
}, {
    "type1": "公测 | 406.4M",
    "name1": "少年群英传",
    "bad1":"good",
    "bad2":"good",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/7/199287587_.png"]
}, {
    "type1": "公测 | 403.4M",
    "name1": "坦克无敌",
    "bad1":"good",
    "bad2":"good",
    "img_url": ["http://image.9game.cn/s/9game/g/2020/12/10/188821395_.png"]
}, {
    "type1": "运营 | 89.6M",
    "name1": "火车驾驶模拟",
    "bad1":"good",
    "bad2":"bad",
    "img_url": ["http://image.9game.cn/s/9game/g/2020/12/11/189060684_.png"]
}, {
    "type1": "不删档内测 | 23.0M",
    "name1": "遇见尊上",
    "bad1":"good",
    "bad2":"bad",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/2/2/209633766_.png"]
}, {
    "type1": "不删档内测 | 82.3M",
    "name1": "决战圣殿",
    "bad1":"good",
    "bad2":"bad",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/9/199920649_.png"]
}, {
    "type1": "不删档内测 | 51.2M",
    "name1": "荣耀崛起",
    "bad1":"good",
    "bad2":"good",
    "img_url": ["http://image.9game.cn/s/9game/g/2021/1/6/199012460_.png"]
}, {
    "type1": "运营 | 68.2M",
    "name1": "城市消防模拟",
    "bad1":"good",
    "bad2":"bad",
    "img_url": ["http://image.9game.cn/s/9game/g/2020/12/11/189055856_.png"]
}];
var new5=document.querySelector(".new5");
var str4="";
for (var i4=0; i4<fifth.length; i4++){
    str4 +=`<li>
    <i class="corner"></i>
    <a href="#" class="img">
        <img src="${fifth[i4].img_url}" alt="${fifth[i4].name1}">
        <span class="radius3"></span>
    </a>
    <p class="name"><a href="#">${fifth[i4].name1}</a></p>
    <p class="type">${fifth[i4].type1}</p>
    <div class="fav">
        <span class="good"></span>
        <span class="good"></span>
        <span class="${fifth[i4].bad1}"></span>
        <span class="${fifth[i4].bad2}"></span>
        <span class="bad"></span>
    </div>
    <a href="#" class="down">立即下载</a>
</li>`
}
new5.innerHTML=str4;
var list=document.querySelectorAll('.one-tab-con li');
var rank=document.querySelectorAll('.rank-poker');
var index=0;
function cur(){
    for(var j=0; j<rank.length; j++){
        list[j].classList.remove('block')
        rank[j].classList.remove('current')
    }
    list[index].classList.add('block')
    rank[index].classList.add('current')
}
list[0].onclick=function(){
    index = 0;
    cur();
}
list[1].onclick=function(){
    index = 1;
    cur();
}
list[2].onclick=function(){
    index = 2;
    cur();
}
list[3].onclick=function(){
    index = 3;
    cur();
}
list[4].onclick=function(){
    index = 4;
    cur();
}
// var rank = document.querySelector('#box')
// var list = rank.querySelectorAll('li')
var con = [];
// for (let dom of list) {
//     var name1 = dom.querySelector('.name a').innerText;
//     var type1 = dom.querySelector('.type').innerText;
//     var imgs = dom.querySelectorAll('img');
//     var img_url = [];
//     for (let a of imgs) {
//         img_url.push(a.getAttribute('src'))
//     }
//     con.push({
//         type1,
//         name1,
//         img_url
//     })
// }
// JSON.stringify(con)
for (let dom of des1) {
    var day = dom.querySelector('.day').innerText;
    var tr=dom.querySelectorAll('tr');
    var trs=[];
    for(let d of tr){
        var time = d.querySelector('.time').innerText;
        var name1 = d.querySelector('.name').innerText;
        var type = d.querySelector('.typetr').innerText;
        trs.push({
            time,
            type,
            name1,
        })
    }
    var imgs = dom.querySelectorAll('img');
    var img_url = [];
    for (let a of imgs) {
        img_url.push(a.getAttribute('src'))
    }
    con.push({
        day,
      
        img_url
    })
}